1. Field of the Invention
The present invention relates to audio coders and particularly to audio coders that are transformation-based, i.e. in which a conversion of a temporal representation to a spectral representation takes place at the beginning of the coder pipeline.
2. Description of the Related Art
A known transformation-based audio coder is shown in FIG. 3. The coder shown in FIG. 3 is illustrated in the international standard ISO/IEC 14496-3: 2001 (E), subpart 4, page 4, and also known as AAC coder in technology.
The prior art coder will be presented below. An audio signal to be coded is supplied in at an input 1000. This audio signal is initially fed to a scaling stage 1002, wherein so-called AAC gain control is conducted to establish the level of the audio signal. Side information from the scaling is supplied to a bit stream formatter 1004, as is represented by the arrow located between block 1002 and block 1004. The scaled audio signal is then supplied to an MDCT filter bank 1006. With the AAC coder, the filter bank implements a modified discrete cosine transformation with 50% overlapping windows, the window length being determined by a block 1008.
Generally speaking, block 1008 is present for the purpose of windowing transient signals with relatively short windows, and of windowing signals which tend to be stationary with relatively long windows. This serves to reach a higher level of time resolution (at the expense of frequency resolution) for transient signals due to the relatively short windows, whereas for signals which tend to be stationary, a higher frequency resolution (at the expense of time resolution) is achieved due to longer windows, there being a tendency of preferring longer windows since they result in a higher coding gain. At the output of filter bank 1006, blocks of spectral values—the blocks being successive in time—are present which may be MDCT coefficients, Fourier coefficients or subband signals, depending on the implementation of the filter bank, each subband signal having a specific limited bandwidth specified by the respective subband channel in filter bank 1006, and each subband signal having a specific number of subband samples.
What follows is a presentation, by way of example, of the case wherein the filter bank outputs temporally successive blocks of MDCT spectral coefficients which, generally speaking, represent successive short-term spectra of the audio signal to be coded at input 1000. A block of MDCT spectral values is then fed into a TNS processing block 1010 (TNS=temporary noise shaping), wherein temporal noise shaping is performed. The TNS technique is used to shape the temporal form of the quantization noise within each window of the transformation. This is achieved by applying a filtering process to parts of the spectral data of each channel. Coding is performed on a window basis. In particular, the following steps are performed to apply the TNS tool to a window of spectral data, i.e. to a block of spectral values.
Initially, a frequency range for the TNS tool is selected. A suitable selection comprises covering a frequency range of 1.5 kHz with a filter, up to the highest possible scale factor band. It shall be pointed out that this frequency range depends on the sampling rate, as is specified in the AAC standard (ISO/IEC 14496-3: 2001 (E)).
Subsequently, an LPC calculation (LPC=linear predictive coding) is performed, to be precise using the spectral MDCT coefficients present in the selected target frequency range. For increased stability, coefficients which correspond to frequencies below 2.5 kHz are excluded from this process. Common LPC procedures as are known from speech processing may be used for LPC calculation, for example the known Levinson-Durbin algorithm. The calculation is performed for the maximally admissible order of the noise-shaping filter.
As a result of the LPC calculation, the expected prediction gain PG is obtained. In addition, the reflection coefficients, or Parcor coefficients, are obtained.
If the prediction gain does not exceed a specific threshold, the TNS tool is not applied. In this case, a piece of control information is written into the bit stream so that a decoder knows that no TNS processing has been performed.
However, if the prediction gain exceeds a threshold, TNS processing is applied.
In a next step, the reflection coefficients are quantized. The order of the noise-shaping filter used is determined by removing all reflection coefficients having an absolute value smaller than a threshold from the “tail” of the array of reflection coefficients. The number of remaining reflection coefficients is in the order of magnitude of the noise-shaping filter. A suitable threshold is 0.1.
The remaining reflection coefficients are typically converted into linear prediction coefficients, this technique also being known as “step-up” procedure.
The LPC coefficients calculated are then used as coder noise shaping filter coefficients, i.e. as prediction filter coefficients. This FIR filter is used for filtering in the specified target frequency range. An autoregressive filter is used in decoding, whereas a so-called moving average filter is used in coding. Eventually, the side information for the TNS tool is supplied to the bit stream formatter, as is represented by the arrow shown between the TNS processing block 1010 and the bit stream formatter 1004 in FIG. 3.
Then, several optional tools which are not shown in FIG. 3 are passed through, such as a long-term prediction tool, an intensity/coupling tool, a prediction tool, a noise substitution tool, until eventually a mid/side coder 1012 is arrived at. The mid/side coder 1012 is active when the audio signal to be coded is a multi-channel signal, i.e. a stereo signal having a left-hand channel and a right-hand channel. Up to now, i.e. upstream from block 1012 in FIG. 3, the left-hand and right-hand stereo channels have been processed, i.e. scaled, transformed by the filter bank, subjected to TNS processing or not, etc., separately from one another.
In the mid/side coder, verification is initially performed as to whether a mid/side coding makes sense, i.e. will yield a coding gain at all. Mid/side coding will yield a coding gain if the left-hand and right-hand channels tend to be similar, since in this case, the mid channel, i.e. the sum of the left-hand and the right-hand channels, is almost equal to the left-hand channel or the right-hand channel, apart from scaling by a factor of ½, whereas the side channel has only very small values since it is equal to the difference between the left-hand and the right-hand channels. As a consequence, one can see that when the left-hand and right-hand channels are approximately the same, the difference is approximately zero, or includes only very small values which—this is the hope—will be quantized to zero in a subsequent quantizer 1014, and thus may be transmitted in a very efficient manner since an entropy coder 1016 is connected downstream from quantizer 1014.
Quantizer 1014 is supplied an admissible interference per scale factor band by a psycho-acoustic model 1020. The quantizer operates in an iterative manner, i.e. an outer iteration loop is initially called up, which will then call up an inner iteration loop. Generally speaking, starting from quantizer step-size starting values, a quantization of a block of values is initially performed at the input of quantizer 1014. In particular, the inner loop quantizes the MDCT coefficients, a specific number of bits being consumed in the process. The outer loop calculates the distortion and modified energy of the coefficients using the scale factor so as to again call up an inner loop. This process is iterated for such time until a specific conditional clause is met. For each iteration in the outer iteration loop, the signal is reconstructed so as to calculate the interference introduced by the quantization, and to compare it with the permitted interference supplied by the psycho-acoustic model 1020. In addition, the scale factors of those frequency bands which after this comparison still are considered to be interfered with are enlarged by one or more stages from iteration to iteration, to be precise for each iteration of the outer iteration loop.
Once a situation is reached wherein the quantization interference introduced by the quantization is below the permitted interference determined by the psycho-acoustic model, and if at the same time bit requirements are met, which state, to be precise, that a maximum bit rate be not exceeded, the iteration, i.e. the analysis-by-synthesis method, is terminated, and the scale factors obtained are coded as is illustrated in block 1014, and are supplied, in coded form, to bit stream formatter 1004 as is marked by the arrow which is drawn between block 1014 and block 1004. The quantized values are then supplied to entropy coder 1016, which typically performs entropy coding for various scale factor bands using several Huffman-code tables, so as to translate the quantized values into a binary format. As is known, entropy coding in the form of Huffman coding involves falling back on code tables which are created on the basis of expected signal statistics, and wherein frequently occurring values are given shorter code words than less frequently occurring values. The entropy-coded values are then supplied, as actual main information, to bit stream formatter 1004, which then outputs the coded audio signal at the output side in accordance with a specific bit stream syntax.
As it has already been set forth, prediction filtering is used for the temporal shaping of the quantization noise within a coding frame in the TNS processing block 1010.
In particular, the temporal shaping of the quantization noise is done by filtering the spectral coefficients over the frequency in the encoder prior to the quantization and ensuing inverse filtering in the decoder. The TNS processing causes the envelope of the quantization noise to be shifted in time below the envelope of the signal, in order to avoid pre-echo artifacts. The application of the TNS results from an estimation of the prediction gain of the filtering, as it has been set forth previously. The filter coefficients for each coding frame are determined via a correlation measure. The calculation of the filter coefficients is done separately for each channel. They are also transmitted separately in the encoded bit stream.
It is disadvantageous in the activation/deactivation of the TNS concept that for each stereo channel the TNS filtering takes place separately for each channel, once a TNS processing has been activated due to a good anticipated coding gain. With relatively different channels this is still unproblematic. But if the left and the right channel are relatively similar, i.e. if the left and the right channel have exactly the same useful information, in an extreme example, such as a speaker, and only differ regarding the noise inevitably contained in the channels, for each channel still a TNS filter of its own is calculated and used in the prior art. Since the TNS filter directly depends on the left and/or right channel and, in particular, reacts relatively sensitively to the spectral data of the left and of the right channel, a TNS processing with a prediction filter of its own is performed for each channel also in the case of a signal in which the left and the right channel are very similar, i.e. in the case of a so-called “quasi-mono signal”. This leads to a different temporal noise shaping also taking place in the two stereo channels due to the different filter coefficients.
It is disadvantageous in this effect that it may lead to audible artifacts, since for example the original mono-like sound impression obtains an undesired stereo character through these temporal differences.
The known procedure, however, has a further, possibly even more serious disadvantage. By the TNS processing, the TNS output values, i.e. the spectral residual values, are subjected to a mid/side coding in the mid/side coder 1002 of FIG. 3. While the two channels were still relatively equal prior to the TNS processing, this can no longer be said after the TNS processing. By the stereo effect described, which has been introduced by the separate TNS processing, the spectral residual values of the two channels are made more dissimilar than they would actually be. This leads to an immediate drop in coding gain due to the mid/side coding, which is particularly disadvantageous for applications in which a low bit rate is required, in particular.
In summary, the known TNS activation thus is problematic for stereo signals using similar, but not exactly identical signal information in both channels, such as mono-like voice signals. As long as different filter coefficients are determined for both channels in the TNS detection, this leads to a temporally different shaping of the quantization noise in the channels. This may lead to audible artifacts, since the original mono-like sound impression obtains an undesired stereo character through these temporal differences, for example. Furthermore, as it has been set forth, the TNS-modified spectrum is subjected to a mid/side coding in a subsequent step. Different filters in both channels additionally reduce the similarity of the spectral coefficients, and thus the mid/side gain.
DE 19829284C2 discloses a method and an apparatus for processing a temporal stereo signal and a method and an apparatus for decoding an audio bit stream encoded using a prediction over the frequency. Depending on the implementation, the left, the right, and the mono channel may be subjected to a prediction of their own over the frequency, i.e. a TNS processing. Thus, a complete prediction of its own may be performed for each channel. Alternatively, in an incomplete prediction, a calculation of the prediction coefficients for the left channel may take place, which are then employed for the filtering of the right channel and the mono channel.